# -*- coding:utf-8 -*-

#开发环境
from distutils.debug import DEBUG


class DevelopConfig:
    DEBUG = True
    PORT = 8080
    HOST = '127.0.0.1'
    SERVER_NAME = f'{HOST}:{PORT}'
    JSON_AS_ASCII = False
    MYSQLCONFIG = {
    "port":3306, 
    "db":"waxyfish",
    "user":"waxyfish", 
    "password":"woshi7575", 
    "host":"81.68.114.163"
    }
    REDISCONFIG = {
    "port":6379, 
    "db":15,
    "password":"EIWQotcukX!9hOVilQygBUfrc0TjqlVA", 
    "host":"81.68.114.163"
    }

# 生产环境
class ProductionConfig:
    DEBUG = False
    PORT = 8080
    HOST = '127.0.0.1'
    SERVER_NAME = f'{HOST}:{PORT}'
    JSON_AS_ASCII = False
    MYSQLCONFIG = {
    "port":3306, 
    "db":"waxyfish",
    "user":"waxyfish", 
    "password":"woshi7575", 
    "host":"81.68.114.163"
    }
    REDISCONFIG = {
    "port":6379, 
    "db":15,
    "password":"EIWQotcukX!9hOVilQygBUfrc0TjqlVA", 
    "host":"81.68.114.163"
    }

CONFIG = {
    'DevelopConfig':DevelopConfig,
    'ProductionConfig':ProductionConfig
}

#切换环境开关
FLASKCONFIG = CONFIG.get('DevelopConfig')